﻿// Copyright 2007-2009 Stuart Caborn, Alex Scordellis
//  
//  Licensed under the Apache License, Version 2.0 (the "License"); 
//  http://www.apache.org/licenses/LICENSE-2.0

namespace MainApplication
{
    public class SomeService
    {
        private readonly ISomeRepository someRepository;

        public SomeService(ISomeRepository someRepository)
        {
            this.someRepository = someRepository;
        }

        public string FindNameFor(int someId)
        {
            return someRepository.FindSomeDomainObject(someId).Name;
        }

        public void Save(SomeDomainObject objectToSave)
        {
            someRepository.Save(objectToSave);
        }
    }
}